using AutoMapper;

namespace DualControl.CompanyInfos.Dtos.CustomMapper
{

    public class CompanyInfoProfile:Profile
    {
        public CompanyInfoProfile()
        {
            CreateMap<CompanyInfo, CompanyInfoListDto>()
                .ForMember(dest => dest.HazardousWorkPlaceForView, opt =>opt.Ignore());
           CreateMap<CompanyInfoEditDto, CompanyInfo>();
        }
    }


    /// <summary>
    /// 配置CompanyInfo的AutoMapper 生成器生成的，有问题，不起作用
    ///</summary>
    //internal static class CustomerCompanyInfoMapper
    //{
    //    public static void CreateMappings(IMapperConfigurationExpression configuration)
    //    {
    //        configuration.CreateMap<CompanyInfo, CompanyInfoListDto>()
    //            .ForMember(dest => dest.HazardousWorkPlaceForView,opt =>
    //            {
    //                opt.Ignore();
    //            });
    //        configuration.CreateMap<CompanyInfoEditDto, CompanyInfo>();



    //        //// custom codes

    //        //// custom codes end

    //    }
    //}
}
